public class Dog {
        public String name;
        public int age;
        public void setName(String name){
            this.name = name;
        }
   /* public Dog(String name, int age) {
        this.name = name;
        this.age = age;
    }*/
        public String hobit() {
            return "喜欢跳舞";
          }

    public void setAgeName(int age,String name) {
            this.age = age;
            this.name = name;
    }


        public static void main(String[] args) {
            //Dog dog1 = new Dog("小白",3);
            Dog dog2 = new Dog();
            dog2.setName("小白");
           /* dog1.name="旺财";
            dog1.age=7;*/

            System.out.println("名字"+ dog1.name+" "+"年龄"+ dog1.age);
            System.out.println("兴趣爱好"+ dog1.hobit());

            Dog dog2 = new Dog();
            dog2.setAgeName(5,"小汪");
            System.out.println("名字"+ dog2.name+" "+"年龄"+ dog2.age);
        }
}
